﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq;
using System.Text;

namespace MergeInfo.Modal.DAO
{
    public abstract class BaseDao
    {
        protected SqlConnection SqlConnection;
        protected SqlCommand SqlCommand;

        protected BaseDao()
        {
            SqlConnection = new SqlConnection
                                {
                                    ConnectionString =
                                        ConfigurationManager.ConnectionStrings["MergeInfoDB"].ConnectionString
                                };
            
        }

        protected void Submit()
        {
            SqlConnection.Open();
            SqlCommand.ExecuteNonQuery();
            SqlConnection.Close();
        }
    }
}
